﻿<%@ Page Language="C#" MasterPageFile="~/Design/MasterPage/MasterPage.master" AutoEventWireup="true"
    CodeFile="PersonReportFormsForm.aspx.cs" Inherits="App_Input_PersonReportFormsForm"
    Title="人事月报表" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">

    <script type="text/javascript">
function countSalary()
{
    var salary = window.document.getElementById('<%=monthSalary.ClientID%>').value.replace(/,/ig,"");
    var fourMoney = window.document.getElementById('<%=fourMoney.ClientID%>').value.replace(/,/ig,"");
    var allowance = window.document.getElementById('<%=allowance.ClientID%>').value.replace(/,/ig,"");
    var hortation = window.document.getElementById('<%=hortation.ClientID%>').value.replace(/,/ig,"");
    var education = window.document.getElementById('<%=education.ClientID%>').value.replace(/,/ig,"");
    var other = window.document.getElementById('<%=other.ClientID%>').value.replace(/,/ig,"");
    var count = window.document.getElementById('<%=count.ClientID%>').value;
    
    if(isNaN(salary)||isNaN(fourMoney)||isNaN(allowance)||isNaN(hortation)||isNaN(education)||isNaN(other))
    {
        if(isNaN(salary))
            window.document.getElementById('<%=monthSalary.ClientID%>').focus();
        else if(isNaN(fourMoney))
            window.document.getElementById('<%=fourMoney.ClientID%>').focus();
        else if(isNaN(allowance))
            window.document.getElementById('<%=allowance.ClientID%>').focus();
        else if(isNaN(hortation))
            window.document.getElementById('<%=hortation.ClientID%>').focus();
        else if(isNaN(education))
            window.document.getElementById('<%=education.ClientID%>').focus();
        else if(isNaN(other))
            window.document.getElementById('<%=other.ClientID%>').focus();
        alert("只能输入数字！");
    }
    else
    {
        count = (salary==""? 0 : parseFloat(salary)) + (fourMoney==""? 0 : parseFloat(fourMoney)) + (allowance==""? 0 : parseFloat(allowance))+ (hortation==""? 0 :parseFloat(hortation))  + (education==""? 0: parseFloat(education)) + (other==""? 0 : parseFloat(other));
        window.document.getElementById('<%=count.ClientID%>').value=Math.round(count*100)/100;
    }
}
    </script>

    <table class="table_border_line">
        <tr>
            <th align="left" colspan="2" style="text-align: center; height: 24px;">
                <span style="font-size: 16pt">人事月报表</span></th>
        </tr>
        <tr>
            <th align="left" colspan="2" style="height: 20px; text-align: center">
            </th>
        </tr>
        <tr>
            <th align="left" colspan="2" style="text-align: center; height: 23px;">
                <asp:DropDownList ID="year" runat="server">
                </asp:DropDownList>
                <span style="font-size: 14pt">年</span>
                <asp:DropDownList ID="month" runat="server">
                </asp:DropDownList><span style="font-size: 14pt">月 &nbsp; &nbsp; </span>&nbsp;
                <asp:Button ID="search" runat="server" CssClass="button" Text="检 索" Width="76px" OnClick="search_Click" /></th>
        </tr>
        <tr>
            <th align="left" colspan="2" style="height: 20px; text-align: center">
            </th>
        </tr>
    </table>
    <table class="table_border_line">
        <tr>
            <th colspan="2" align="left" style="text-align: left;">

                <script language="javascript">
        (new TitleBar('SearchBar', '编制情况')).showBar();
                </script>

            </th>
        </tr>
        <tr>
            <th align="left" colspan="2" style="text-align: left; height: 20px;">
            </th>
        </tr>
        <tr>
            <td colspan="2" style="height: 261px">
                <asp:GridView ID="viewSrhRst" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                    BorderStyle="Solid" BorderWidth="3px" CssClass="GridView_table" OnPageIndexChanging="viewSrhRst_PageIndexChanging"
                    OnRowDataBound="viewSrhRst_RowDataBound" PageSize="11" RowHeaderColumn="DepartmentName">
                    <PagerSettings Mode="NumericFirstLast" />
                    <Columns>
                        <asp:BoundField HeaderText="序号">
                            <ItemStyle CssClass="GridView_item_center" />
                            <HeaderStyle CssClass="GridView_head_grayblue" Width="10%" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="部门" DataField="DepartmentName">
                            <ItemStyle CssClass="GridView_item_left" />
                            <HeaderStyle CssClass="GridView_head_grayblue" Width="10%" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="上月总数" DataField="LastMonthCount">
                            <ItemStyle CssClass="GridView_item_center" />
                            <HeaderStyle CssClass="GridView_head_grayblue" Width="10%" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="本月新进" DataField="MonthNewJoin">
                            <ItemStyle CssClass="GridView_item_center" />
                            <HeaderStyle CssClass="GridView_head_grayblue" Width="10%" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="本月离职" DataField="MonthLeave">
                            <ItemStyle CssClass="GridView_item_center" />
                            <HeaderStyle CssClass="GridView_head_grayblue" Width="10%" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="本月总数" DataField="MonthCount">
                            <ItemStyle CssClass="GridView_item_center" />
                            <HeaderStyle CssClass="GridView_head_grayblue" Width="10%" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="正式劳动合同人数" DataField="Official">
                            <ItemStyle CssClass="GridView_item_center" />
                            <HeaderStyle CssClass="GridView_head_grayblue" Width="15%" />
                        </asp:BoundField>
                        <asp:BoundField HeaderText="试用人数" DataField="Probation">
                            <ItemStyle CssClass="GridView_item_center" />
                            <HeaderStyle CssClass="GridView_head_grayblue" Width="15%" />
                        </asp:BoundField>
                    </Columns>
                    <PagerStyle HorizontalAlign="Right" />
                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td align="center">
                <asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>
            </td>
            <td align="center">
                <asp:PlaceHolder ID="PlaceHolder2" runat="server"></asp:PlaceHolder>
            </td>
        </tr>
    </table>
    <br />
    <table class="table_border_line">
        <tr>
            <th colspan="8" align="left" style="text-align: left; height: 15px;">

                <script language="javascript">
        (new TitleBar('SearchBar1', '人力成本发生情况（约）')).showBar();
                </script>

            </th>
        </tr>
        <tr>
            <th align="left" colspan="8" style="height: 20px; text-align: left">
            </th>
        </tr>
        <tr>
            <td style="text-align: center; width: 70px; height: 30px;">
                项目</td>
            <td style="text-align: center; width: 70px; height: 30px;">
                月薪</td>
            <td style="text-align: center; width: 70px; height: 30px;">
                四金</td>
            <td style="text-align: center; width: 70px; height: 30px;">
                补贴</td>
            <td style="text-align: center; width: 70px; height: 30px;">
                奖励</td>
            <td style="text-align: center; width: 70px; height: 30px;">
                培训</td>
            <td style="text-align: center; width: 70px; height: 30px;">
                其他</td>
            <td style="text-align: center; width: 70px; height: 30px;">
                合计</td>
        </tr>
        <tr>
            <td style="text-align: center; width: 70px; height: 29px;">
                金额（元）</td>
            <td style="text-align: center; width: 70px; height: 29px;">
                <input id="monthSalary" runat="server" type="text" style="width: 100px" onblur="javascript:countSalary();" /></td>
            <td style="text-align: center; width: 70px; height: 29px;">
                <input id="fourMoney" runat="server" type="text" style="width: 100px" onblur="javascript:countSalary();" /></td>
            <td style="text-align: center; width: 70px; height: 29px;">
                <input id="allowance" runat="server" type="text" style="width: 100px" onblur="javascript:countSalary();" /></td>
            <td style="text-align: center; width: 70px; height: 29px;">
                <input id="hortation" runat="server" type="text" style="width: 100px" onblur="javascript:countSalary();" /></td>
            <td style="text-align: center; width: 70px; height: 29px;">
                <input id="education" runat="server" type="text" style="width: 100px" onblur="javascript:countSalary();" /></td>
            <td style="text-align: center; width: 70px; height: 29px;">
                <input id="other" runat="server" type="text" style="width: 100px" onblur="javascript:countSalary();" /></td>
            <td style="text-align: center; width: 70px; height: 29px;">
                <input id="count" runat="server" type="text" style="width: 100px" readonly="readOnly" /></td>
        </tr>
    </table>
    <br />
    <table class="table_border_line">
        <tr>
            <th colspan="3" align="left" style="text-align: left;">

                <script language="javascript">
        (new TitleBar('SearchBar3', '人事手续说明')).showBar();
                </script>

            </th>
        </tr>
        <tr>
            <th align="left" colspan="3" style="text-align: left; height: 20px;">
            </th>
        </tr>
        <tr>
            <td style="width: 50px; text-align: center;">
                序号</td>
            <td style="width: 100px; text-align: center;">
                事项</td>
            <td>
                说明（部门、岗位、姓名）</td>
        </tr>
        <tr>
            <td style="width: 50px; text-align: center;">
                1</td>
            <td style="width: 100px">
                本月四金、录用等手续、异常情况</td>
            <td>
                <asp:TextBox ID="employeMemo" runat="server" Rows="3" TextMode="MultiLine" Width="100%"></asp:TextBox></td>
        </tr>
        <tr>
            <td style="width: 50px; text-align: center;">
                2</td>
            <td style="width: 100px">
                试用期动态跟踪重点对象</td>
            <td>
                <asp:TextBox ID="probationMemo" runat="server" Rows="3" TextMode="MultiLine" Width="100%"></asp:TextBox></td>
        </tr>
        <tr>
            <td style="width: 50px; text-align: center;">
                3</td>
            <td style="width: 100px">
                下月待办转正</td>
            <td>
                <asp:TextBox ID="waitMemo" runat="server" Rows="3" TextMode="MultiLine" Width="100%"></asp:TextBox></td>
        </tr>
        <tr>
            <td style="width: 50px; text-align: center;">
                4</td>
            <td style="width: 100px">
                下月计划签合同</td>
            <td>
                <asp:TextBox ID="contractMemo" runat="server" Rows="3" TextMode="MultiLine" Width="100%"></asp:TextBox></td>
        </tr>
        <tr>
            <td style="width: 50px; text-align: center;">
                5</td>
            <td style="width: 100px">
                正招聘岗位</td>
            <td>
                <asp:TextBox ID="inviteMemo" runat="server" Rows="3" TextMode="MultiLine" Width="100%"></asp:TextBox></td>
        </tr>
    </table>
    <br />
    <table class="table_border_line">
        <tr>
            <td style="text-align: center;">
                <asp:Button ID="save" runat="server" CssClass="button" OnClientClick="return window.confirm('是否登记？');"
                    Text="登 记" Width="102px" OnClick="save_Click" /></td>
        </tr>
    </table>
</asp:Content>
